# /bin/sh

echo "***************** Creat File for linux arm cpu version**********************"

rm ~/桌面/agvHmiPackage.zip
rm -rf agvwork
mkdir agvwork
mkdir agvwork/tmp

# ********************* Creat AgvFundation ***************
#mkdir agvwork/AgvFundation
#mkdir agvwork/AgvFundation/fundation
#smkdir agvwork/AgvFundation/fundation/data

# ********************* Creat AgvHmi *********************
mkdir agvwork/AgvHmi
mkdir agvwork/AgvHmi/baseBag
mkdir agvwork/AgvHmi/baseBag/hmiProject
mkdir agvwork/AgvHmi/baseBag/hmiProject/bin
mkdir agvwork/AgvHmi/baseBag/hmiProject/bin/arm
mkdir agvwork/AgvHmi/baseBag/hmiProject/lib
mkdir agvwork/AgvHmi/baseBag/hmiProject/lib/arm
mkdir agvwork/AgvHmi/baseBag/hmiProject/data
mkdir agvwork/AgvHmi/baseBag/hmiProject/resources
mkdir agvwork/AgvHmi/baseBag/hmiProject/fonts
mkdir agvwork/AgvHmi/baseBag/hmiProject/language

echo "****************** Copy lib*.so 3 *********************"
cp /agvwork/AgvHmi/baseBag/hmiProject/lib/arm/lib*.so.1.0.0 ./agvwork/AgvHmi/baseBag/hmiProject/lib/arm
#cp ../hmiProject/lib/arm/lib*.so.1.0.0 ../tool/lib-arm
#cp cmd.sh ./agvwork/AgvHmi/baseBag/hmiProject/lib/arm


cd ./agvwork/AgvHmi/baseBag/hmiProject/lib/arm

for var in *so.1.0.0;do mv $var ${var%so.1.0.0}so.1;done
cd /agvwork/AgvHmi/baseBag/tool
echo "****************** Copy hmiMain **********************"
cp -rf /agvwork/AgvHmi/baseBag/hmiProject/bin/arm/* ./agvwork/AgvHmi/baseBag/hmiProject/bin/arm


echo "****************** Copy Fonts ************************"
cp -rf simhei.ttf ./agvwork/AgvHmi/baseBag/hmiProject/fonts

echo "****************** Copy AgvHmi data ******************"
cp -rf /agvwork/AgvHmi/baseBag/hmiProject/data/* ./agvwork/AgvHmi/baseBag/hmiProject/data

echo "****************** Copy AgvHmi resources *************"
cp -rf /agvwork/AgvHmi/baseBag/hmiProject/resources/* ./agvwork/AgvHmi/baseBag/hmiProject/resources

echo "****************** Copy Language *********************"
cp -rf /agvwork/AgvHmi/baseBag/hmiProject/language/*.qm ./agvwork/AgvHmi/baseBag/hmiProject/language



echo "****************** ZIP All2 ***************************"
agvzipname=~/桌面/armPendentHmiPackage.zip
if [ -d ~/桌面/ ];then
zip -r $agvzipname ./agvwork
fi

agvzipname=~/Desktop/armPendentHmiPackage.zip
if [ -d ~/Desktop/ ];then
zip -r $agvzipname ./agvwork
fi


echo "********************* End zip ****************************"


